CC = gcc
CFLAGS += -I../../include
TOP_DIR := $(PWD)
OBJSDIR = $(PWD)/build
BINDIR = $(OBJSDIR)/bin
CLIENT_DIR := $(PWD)/src/client/
SERVER_DIR := $(PWD)/src/server/

export CC CFLAGS OBJSDIR BINDIR

.PHONY:all clean
all:$(OBJSDIR) $(BINDIR)
	$(MAKE) -C $(CLIENT_DIR)
	$(MAKE) -C $(SERVER_DIR)
clean:
	$(MAKE) -C $(CLIENT_DIR) clean
	$(MAKE) -C $(SERVER_DIR) clean
	$(RM) $(BINDIR)/* -r

$(OBJSDIR):
	mkdir -p $(OBJSDIR)
$(BINDIR):
	mkdir -p $(BINDIR)
